package com.company.cloud.user.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.request.ValidateUserRequest;
import com.company.cloud.user.modules.api.response.ValidateUserResponse;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.company.cloud.user.modules.api.fallback.UserRegisterRemoteServiceFallbackFactory;
import com.company.cloud.user.modules.api.request.RegisterEmployeeRequest;
import com.company.cloud.user.modules.api.response.UserFull;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "user2", name = ServiceNameConstant.user_center, fallbackFactory = UserRegisterRemoteServiceFallbackFactory.class)
public interface UserRegisterRemoteService {
	
	@RequestMapping(value = "/remote/user/register", method = RequestMethod.POST)
	public BaseClientResult<UserFull> register(@RequestBody RegisterEmployeeRequest params);

	@RequestMapping(value = "/remote/user/validateUserName", method = RequestMethod.POST)
	public BaseClientResult<ValidateUserResponse> validateUserName(@RequestBody ValidateUserRequest params);

	
}
